/*
 * @Author: shengduiliang 1107722390@qq.com
 * @Date: 2024-05-04 17:19:54
 * @LastEditors: shengduiliang 1107722390@qq.com
 * @LastEditTime: 2024-05-04 17:23:00
 * @FilePath: /treasure/src/ui-components/image/index.tsx
 * @Description: 图片组件, 封装了CDM地址
 */
import { Image, ImageProps } from "@tarojs/components";
import { imageUtils } from "@/utils";
import defaultImage from './images/defaultImage.png'

const CdnImage = (props: ImageProps) => {
  return (
    <Image
      defaultSource={defaultImage}
      {...props}
      src={imageUtils.getCdnImage(props.src)}
    />
  ) 
}

export default CdnImage